package com.onesports.intelligent.k12.polarlight.mapper.course;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.onesports.intelligent.k12.polarlight.domain.dto.course.CourseQueryDTO;
import com.onesports.intelligent.k12.polarlight.domain.entity.course.Course;
import com.onesports.intelligent.k12.polarlight.domain.vo.course.CampusCourseVO;
import com.onesports.intelligent.k12.polarlight.domain.vo.course.CourseGuidePriceRelVO;
import com.onesports.intelligent.k12.polarlight.domain.vo.course.CourseVO;
import com.onesports.intelligent.k12.polarlight.domain.vo.message.CourseMessageContentVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

/**
 * 课程配置表
 *
 * @author
 * @since 1.0.0 2022-07-08
 */
@Mapper
public interface CourseMapper extends BaseMapper<Course> {

    /**
     * 根据课程id查询拼版规则
     *
     * @param ids course_id
     * @return
     */
    List<CourseGuidePriceRelVO> queryClassMergeRuleByIds(@Param("ids") List<String> ids);

    /**
     * 课程分页
     *
     * @param page 分页参数
     * @param dto  入参
     * @return IPage<CourseVO>
     */
    IPage<CourseVO> coursePage(@Param("page") Page<CourseVO> page, @Param("dto") CourseQueryDTO dto);

    /**
     * 还未上课的课程列表
     * @return CourseMessageContentVO
     */
    List<CourseMessageContentVO> getCourseMessageContent(@Param("now") String now );

    /**
     * 根据校区id获取课程下拉
     * @param campusId 校区id
     * @return CampusCourseVO
     */
    List<CampusCourseVO> courseByCampusId(@Param("campusId") String campusId);


}
